Sugar - Soil Moisture
Introduction
Soil sensor, used to detect soil moisture, meow home soil module adopts capacitive soil, anti-corrosion, when the humidity is larger, the analog value returned is smaller
Parameters
Dimension | 24 x 24 x 70 mm |
---|---|
Weight | 6.7 g |
Signal | Analog Input |
Range | 0~3.3V for Microbit 0~1023 |
Detection Target | Soil |
Using (Makecode) on Microbit
Coding Platform
Microsoft MakeCode for micro:bit Use Makecode coding platform
Add the Sugar Plugin
Within Extensions, search for Sugar and click Add
Building Block - Functional Description
S.No | Building Block Image | Building Block Function |
---|---|---|
1 | Retrieves Soil sensor value (0-1023) |
Circuit Connection
Microbit port | Wire used | |||
---|---|---|---|---|
Cube soil moisture module | P0 | White PH2.0-3Pin interface wire |
Connect the light-sensitive module to the P1 of Robotbit Edu using the 3PIN terminal wire. (Only the three pins with analog read function, P0, P1, and P2, can be connected) Turn on the Robotbit power and you can see the red light at the bottom of the soil module light up (indicating that the module is powered normally)
Case
First, map the soil moisture value from 0-1023 to 1023 to 0, so that the wetter the soil, the greater the value Then determine whether the value is below the set value, and a sad face is displayed if it is below the set value
Using (KittenBlock) on Microbit
Programming
Use the Microbit dot matrix smiley face crying face to feedback the soil conditions and remind you to water the plants Choose to run the program online or offline to see the effect If you are still not clear how to run online or upload offline, please refer to Quick Start
Case # Plant Watering Reminder
When the soil is relatively dry, it shows a crying face, and a smiling face at other times.